<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="" data-source="user/user/index" data-field="nickname" class="form-control selectpage form-control" name="row[user_id]" type="text" value="{$row.user_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="ask/category/index" data-params='{"custom[type]":"question"}' class="form-control selectpage form-control" name="row[category_id]" type="text" value="{$row.category_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control form-control" name="row[title]" type="text" value="{$row.title}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" class="form-control form-control" step="0.01" name="row[price]" type="number" value="{$row.price}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Score')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-score" class="form-control form-control" step="1" name="row[score]" type="number" value="{$row.score}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-flag" class="form-control selectpicker" multiple="" name="row[flag][]">
                {foreach name="flagList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.flag"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Voteup')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-voteup" class="form-control form-control" name="row[voteup]" type="number" value="{$row.voteup}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Votedown')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-votedown" class="form-control form-control" name="row[votedown]" type="number" value="{$row.votedown}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Followers')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-followers" class="form-control form-control" name="row[followers]" type="number" value="{$row.followers}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Views')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-views" class="form-control form-control" name="row[views]" type="number" value="{$row.views}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Collections')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-collections" class="form-control form-control" name="row[collections]" type="number" value="{$row.collections}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thanks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-thanks" class="form-control form-control" name="row[thanks]" type="number" value="{$row.thanks}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reports')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reports" class="form-control form-control" name="row[reports]" type="number" value="{$row.reports}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Answers')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-answers" class="form-control form-control" name="row[answers]" type="number" value="{$row.answers}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Comments')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-comments" class="form-control form-control" name="row[comments]" type="number" value="{$row.comments}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Peeps')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-peeps" class="form-control form-control" name="row[peeps]" type="number" value="{$row.peeps}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor form-control" rows="5" name="row[content]" cols="50">{$row.content}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Best_answer_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-best_answer_id" data-rule="required" class="form-control form-control" name="row[best_answer_id]" type="text" value="{$row.best_answer_id}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Isanonymous')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[isanonymous]',[1=>__('Yes'),0=>__('No')],$row['isanonymous'])}
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rewardtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rewardtime" class="form-control datetimepicker form-control" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[rewardtime]" type="text" value="{:$row.rewardtime?datetime($row.rewardtime):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
